Chapter 5
Training Voice Commands

The next three chapters take you step-by-step through training Simon, using voice control, adding an application to Simon's vocabulary, and creating voice-activated macros. We'll use Simon Says, Workspace and Mail as our tutorial applications.

The Vocabulary Panel

If you've just finished installing and registering Simon Says, Simon's vocabulary panel appears on your screen. 
If not, double-click Simon's icon to open the panel.

The vocabulary panel is the ªcontrol centerº of Simon Says. It's where you add applications and commands to Simon's vocabulary, train Simon to respond to your voice, and create macros. 

Simon's Status 

The menu item under Commands allows you to  select either Training or Listening. Since we're going to train Simon's built-in vocabulary, make sure Simon's current status is training by selecting Training under the SimonSays menu under Commands .

Once trained, Simon automatically enters ªListeningº mode each time the application is launched, and the vocabulary panel is automatically hidden. To ªunhideº the panel, double-click Simon's icon. 

If Simon is in "Listening" mode and you wish to train Simon, add or delete applications, or create macros, 
click Training under the Commands under the SimonSays menu.

Understanding Levels

To the left of Simon's status panel is a browser showing applications and commands currently in Simon's vocabulary. Right now, the commands in the browser are displayed in italic because they are not yet ªTrained.º Trained commands appear in plain text. 

The command structure of this browser works just like your NeXT File Viewer. An application's commands are divided into levels. The levels are like folders in a File Viewer. Just as one folder can lead to several other folders and files, one level of commands can lead to several other levels of commands.

The first column, or level, of the browser contains application folders and a folder called Common Words. Select Common Words, or an application folder in this level and another level of associated commands appear in the column to the right. In Listening mode, Simon listens only for commands in the active application at the currently active levelor for commands that appear in the Common Words folder. 

The Common Words Folder

Common Words is a special folder. It' s where you store commands common to many applications. It's also the folder where you store the names of the applications whose folders appear in the first level of the browser. 

The reason Simon has a Common Words folder is so that duplicate commands are not stored in application folders. This saves disk space and helps keep Simon from getting confused. 

Simon always listens for commands in the Common Words folderunless you've entered a Sub-level that was set up so that Simon would listen only for specifically-defined commands. Sub-levels are explained in Chapter 10 Advanced Features. 

There are several commands common to many applicationswe've selected 12 of the most common and added them to the Common Words folder for you. They are: Select All, Copy, Hide, New, Open, Print, Save, Paste, Close Window, Cut and Undo.

As you train Simon's vocabulary you'll notice that we've renamed some of these commands. That's because sometimes Simon has difficulty understanding very short commands, or commands that sound similar. The Cut, Hide, and Quit commands are now named Cut_Selection, Hide_App, and Quit_Application.

Keep this in mind later when you've added new applications or commands to Simon's vocabulary. If Simon is having trouble with a particular command, it may be that the command is too short or sounds similar to other commands. We'll show you how to rename commands later in this chapter. 

Training Tips

Before training Simon for the first time, take a few minutes to read the following tips. Since this is probably your first time using voice control, following these guidelines will help you get the best results. 

Position Your Microphone Properly

If you're using a desktop microphone or one built-in to your NeXT computer, position yourself directly in front of it. If you are holding a microphone or wearing a headset, make sure the microphone element is directly in front of your mouth (within 3 inches). Try to always keep your microphone (or yourself) in a consistent position.

Speak Naturally

Speak to Simon in a relaxed, natural voiceas if you're speaking to a friend. If you're training a command which has more than one word (such as ªFont_Panelº), do not pause between the words. An underscore is placed between the words to remind you to speak the command as a phrase. 

Watch for the ªOn-Screenº Prompts

After you click the Train button, Simon will prompt you to train the first command by displaying the command in the Command Trainer panel. You'll be prompted to say each word three times so that Simon can record an accurate sample of your voice. The default number of samples per command is three, and can be changed to four, five or six in the Preferences panel. 

Training Simon

You're now ready to train commands in Simon's vocabulary. We'll begin by training Simon to recognize commands in the Common Words folder. Then we'll train the Simon Says application and the Workspace Manager application. 

To train Simon's vocabulary:

1.	Make sure Simon is ready to trainÐindicated by Simon's Status in the vocabulary panel. 
	If not, click Training.

2.	Select the Common Words folder by clicking its name in the first column of the Vocabulary panel's browser.  The title of the browser's second column changes to Common Words and the associated commands are displayed beneath. 

3.	Below the browser are six buttons labeled  Add, Delete, Rename, Sub-level, Add App¼, and Train¼ 
	Click Train¼ 

4.	The Command Trainer panel appears and displays the first untrained command in a box in the center of the panelin this case, Close_Window. You'll be prompted to speak when the command flashes. When it does, say ªClose_Window.º Speak a command only once after it flashes. Pause until the next flash, then speak the command again. Once Close_Window is trained, the next word appears in the box. Remember to speak naturally. 

If you need to take a break while training, click Pause. When you're ready to continue, click Unpause. 
To stop training, click Cancel. 

The Command Trainer panel provides visual feedback by displaying information about the current training session:

Words left to train: indicates the number of commands left to train in the current level. After a command is successfully trained, the next command appears and the number decreases by one.

Samples left to train: indicates the number of samples left to train for the current command. You'll be prompted to say each command three times so that Simon can record an accurate sample of your voice. Each time you speak a command, this number will decrease by one. If an accurate sample is not recorded, you'll be prompted to repeat the command three more times. 

Note: As a general rule, it is more difficult to obtain an accurate sample from shorter commands such as Hide or Save, than from longer commands like Check_Spelling or Close_Window.

5.	Continue until all commands in the Common Words folder are trained. 
When you're finished, the Command Trainer panel closes and the browser displays the commands you've just trained in plain text. 

6.	Select SimonSays by clicking its name in the first level of the browser, then click Train. 
Train the commands associated with Simon Says. 

7.	Now train Workspace. 
You may notice that we left the Destroy command out of the Workspace folder. Until you've had a bit of practice, we thought this might be a good idea! You can add the command later if you like. 

8.	Leave Simon in Training mode and the vocabulary panel open. 
That's all there is to training. With a little practice you'll learn to train Simon quickly and speak more consistently so that accurate samples of your voice are always recorded.

If you can't wait to get started, turn to Chapter 6Using Voice Control and complete the tutorial. After you've finished the tutorial, read the rest of this chapter, then read Chapter 7 Using Keyboard Equivalents, then Chapter 8Adding Applications and Chapter 9Voice-Activated Macros.

Modifying Commands

When controlling applications by voice, you may notice that sometimes Simon does not understand a command the first time it's spoken, or confuses a command with one that sounds similar. It's possible that an accurate sample of the command was not recorded during training. It's easy to retrain a command.

You may also find there is an application in Simon's vocabulary you rarely use. You can untrain an application so that Simon no longer listens for its commands;the commands remain in Simon's vocabulary if you want to retrain them later. Or, you can delete a command or application entirely. 

Retraining a Command

To retrain a command:

1.	Select the command you want to retrain by clicking its name in the browser. 
Remember that the command to launch an application (the application's name) is located in the Common Words folder. Commands associated with an application (such as its menu items) are kept in the corresponding application's folder. If you want to retrain all commands in an application, select the application's folder. 

2.	Click Train. 
An alert panel appears indicating the word is already trained.

3.	Click Retrain. 
When the Word Trainer panel appears, retrain the command.

Untraining an Application

To untrain an application: 

1.	Select the application you want to untrain by clicking its name in the browser. 

2.	Click Train. 
An alert panel appears indicating the word is already trained.

3.	Click Untrain. 
The application is untrained and its name and associated commands are now displayed in italic. 

Note: All commands in an application's folder must be trained before you can control the application by voice. If you untrain a single command in an application, you cannot control the application by voice until you retrain the command or delete it from Simon's vocabulary. 

Deleting a Command or Application

To delete a command or application:

1.	Select the command or application you want to delete by clicking its name in the browser. 
If you delete an application's folder, it's name is automatically deleted from the Common Words folder. If you delete an application's name in the Common Words folder, the application's folder is automatically deleted. 

2.	Click Delete.

The command or application is removed from Simon's vocabulary. 

Renaming a Command

There are several reasons why you might want to rename a command, including making it easier to remember, reducing recognition problems with similar commands, or just personal preferences. For example, to open a 
Font Panel, you may prefer to simply say ªFontsº rather than ªFont_Panel.º

To rename a command:

1.	Select the command you want to rename by clicking its name in the browser. 
The name of the command appears in the text field beneath the browser.

2.	Delete the name in the text field and enter a new name for the command.

3.	Click Rename.

The command is renamed and appears in the browser in plain text. Before using the command, you'll 
need to retrain it.